package src.com.zaizai123;

import java.awt.*;

public class FrameEncapsulationProI implements Runnable{
    @Override
    public void run() {

    }

    Frame frame = new Frame();
    public void setName(String name) {
        frame.setTitle(name); // 直接设置已有的 frame 对象的标题
    }
    public void frame01(){
        frame.setVisible(true);
        frame.setSize(200,500);
        frame.setBackground(new Color(0,0,0));
        frame.setLocation(100,200);
        frame.setResizable(false);
    }
    public void frame02(){
        frame.setVisible(true);
        frame.setSize(200,500);
        frame.setBackground(new Color(255,0,0));
        frame.setLocation(600,200);
        frame.setResizable(false);
    }
    public void frame03(){
        frame.setVisible(true);
        frame.setSize(200,500);
        frame.setBackground(new Color(255,255,0));
        frame.setLocation(1100,200);
        frame.setResizable(false);
    }
    public void frame04(){
        frame.setVisible(true);
        frame.setSize(200,500);
        frame.setBackground(new Color(255,0,255));
        frame.setLocation(1600,200);
        frame.setResizable(false);
    }
    public void frame05(){
        frame.setVisible(true);
        frame.setSize(200,500);
        frame.setBackground(new Color(255,0,0));
        frame.setLocation(2400,200);
        frame.setResizable(false);

    }



}
